package com.greenline.push.core.pushcenter.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.greenline.push.core.pushcenter.ClassMessageManager;
import com.greenline.push.dal.pushcenter.ClassMessageDAO;
import com.greenline.push.dal.pushcenter.dataobject.ClassMessageDO;
import com.greenline.push.dal.query.ClassMessageQuery;

public class ClassMessageManagerImpl implements ClassMessageManager {

	@Autowired
	private ClassMessageDAO msgDAO;

	@Override
	public Long insert(ClassMessageDO msgDO) {
		return msgDAO.insert(msgDO);
	}

	@Override
	public ClassMessageDO getClassMessageById(Long id) {
		return msgDAO.getClassMessageById(id);
	}

	@Override
	public boolean update(ClassMessageDO msgDO) {
		return msgDAO.update(msgDO) > 0;
	}

	@Override
	public ClassMessageQuery listByQuery(ClassMessageQuery query) {
		return msgDAO.listByQuery(query);
	}

	@Override
	public boolean delete(Long id) {
		return msgDAO.delete(id) > 0;
	}

}
